package com.cx.service.serviceimp;

import com.cx.entity.Category;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.cx.mapper.IncomeMapper;
import java.util.List;
import com.cx.entity.Income;
import com.cx.service.IncomeService;

@Service
public class IncomeServiceImpl implements IncomeService {

    @Resource
    private IncomeMapper incomeMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return incomeMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Income record) {
        return incomeMapper.insert(record);
    }

    @Override
    public int insertOrUpdate(Income record) {
        return incomeMapper.insertOrUpdate(record);
    }

    @Override
    public int insertOrUpdateSelective(Income record) {
        return incomeMapper.insertOrUpdateSelective(record);
    }

    @Override
    public int insertSelective(Income record) {
        return incomeMapper.insertSelective(record);
    }

    @Override
    public Income selectByPrimaryKey(Integer id) {
        return incomeMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(Income record) {
        return incomeMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Income record) {
        return incomeMapper.updateByPrimaryKey(record);
    }

    @Override
    public int updateBatch(List<Income> list) {
        return incomeMapper.updateBatch(list);
    }

    @Override
    public int batchInsert(List<Income> list) {
        return incomeMapper.batchInsert(list);
    }

    @Override
    public List<Income> incomeList(Integer pageNum, Integer pageSize) {
        int offset = (pageNum - 1) * pageSize;
        return incomeMapper.incomeList(offset, pageSize);
    }


}








